<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="renderer" content="webkit">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>恒达汽修有限公司</title>

<link rel="stylesheet" type="text/css" href="css/meteinfo_ui.css"
	id="metuimodule" data-module="1" />
<link rel="stylesheet" type="text/css" href="css/metinfo.css" />
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script src="js/metinfo_ui.js" type="text/javascript"></script>
<script src="js/ch.js" type="text/javascript"></script>

<!--[if IE]>
<script src="public/js/html5.js" type="text/javascript"></script>
<![endif]-->
</head>

<body>
	<div class="m-nav">
		<nav class="inner">
		<ul class="list-none">
			<li id="nav_10001" style='width: 123px;'><a href='index.jsp'
				title='网站首页' class='nav'><span>网站首页</span></a></li>
			<li id='nav_1' style='width: 123px;'><a href='about.jsp'
				0 title='关于我们' class='hover-none nav'><span>关于我们</span></a></li>
			<li id='nav_2' style='width: 123px;'><a href='selectTitleZ'
				title='信息中心' class='hover-none nav'><span>信息中心</span></a></li>
			<li id='nav_3' style='width: 123px;'><a
				href='${pageContext.request.contextPath }/receptionSelectStock'
				title='恒达汽修产品' class='hover-none nav'><span>恒达汽修产品</span></a></li>
			<li id='nav_4' style='width: 122px;'><a href='cases.jsp'
				title='服务车型' class='hover-none nav'><span>服务车型</span></a></li>
			<li id='nav_34' style='width: 122px;'><a href='findQtRecruit'
				title='在线招聘' class='hover-none nav'><span>在线招聘</span></a></li>
			<li id='nav_11' style='width: 122px;'><a href='booking.jsp'
				title='在线预约' class='hover-none nav'><span>在线预约</span></a></li>
			<li id='nav_18' style='width: 122px;' class='navdown'><a
				href='${pageContext.request.contextPath }/selectNo' title='联系我们'
				class='hover-none nav'><span>联系我们</span></a></li>
		</ul>

		</nav>
	</div>


	<header>
	<div class="inner top">
		<a title="汽配公司" id="web_logo"> <img src="img/1363847903.png"
			style="width: 210px; height: 55px;" alt="汽配公司" title="汽配公司"
			style="margin:0px 0px 0px 10px;" />
		</a>
		<div class="top-seo">
			<div class="tpseotxt">
				<p>&nbsp;020-5856-1762</p>
			</div>
		</div>
	</div>
	</header>
	<div class="inner met_flash">
		<div class="flash">
			<img src='img/1363850250.jpg' width='980' alt='' height='300'>
		</div>
	</div>
	<div class="sidebar inner">
		<div class="sb_nav">
			<h3 class='title'>联系我们</h3>
			<div class="active b-r" id="sidebar" data-csnow="12" data-class3="0"
				data-jsok="2">
				<dl class="list-none navnow">
					<dt id='part2_'>
						<a href="${pageContext.request.contextPath }/selectNo"
							title='电话地址' class="zm"><span>联系我们</span></a>
					</dt>
				</dl>
				<dl class="list-none navnow">
					<dt id='part2_' class='on'>
						<a href="${pageContext.request.contextPath }/selectOne"
							title='客户留言' class="zm"><span>客户留言</span></a>
					</dt>
				</dl>
				<div class="clear"></div>
			</div>
			<h3 class='title line'>联系方式</h3>
			<div class="active editor b-r">
				<div>联系人：${list[4].admin_name }</div>
				<div>手机：${list[4].admin_phone }</div>
				<div>QQ：${list[4].admin_qq }</div>
				<div class="clear"></div>
			</div>
		</div>
		<div class='sb_box b-r'>
			<h3 class="title">
				<div class="position">
					当前位置：<a href="../" title="网站首页">网站首页</a> &gt; <a href=../message/ >客户留言</a>
				</div>
				<span>客户留言</span>
			</h3>
			<div class="clear"></div>
			<div class="active" id="messagelist">
				<h3 class="ctitle">提交留言</h3>
				<form method='POST' id="frmAddAdvice" target='_self'>
					<table class='feedback_table'>
						<tr>
							<td class='text'>姓名</td>
							<td class='input'><input name='clientName' maxlength="10"
								type='text' size='30' class='input-text' /><span class='info'
								id="name">*</span><span></span></td>
						</tr>
						<tr>
							<td class='text'>电话</td>
							<td class='input'><input maxlength="11" name='telephone'
								type='text' size='30' class='input-text' /><span class='info'
								id="phone">*</span><span></span></td>
						</tr>
						<tr>
							<td class='text'>留言内容</td>
							<td class='input'><textarea maxlength="100" name='content'
									class='textarea-text' cols='50' rows='5'></textarea><span
								class='info' id="content">*</span><span></span></td>
						</tr>
						<tr>
							<td class='text'>是否留言</td>
							<td class='input'><input maxlength="11" name='code'
								type='text' size='30' class='input-text' /><span class='info'
								id="code">*</span><span></span></td>
						</tr>
						<tr>
							<td class='text'></td>
							<td class='submint'><input type='hidden' name='fdtitle'
								value='' /> <input type='hidden' name='lang' value='cn' /> <input
								type='hidden' name='ip' value='118.250.117.95' /> <input
								type='hidden' name='totnum' value='5' /> <input type='hidden'
								name='id' value='' /> <input id="btnSubmit" type='button'
								value='提交信息' class='submit button orange'> <br />
						</tr>
					</table>
				</form>
				<iframe style="width: 100%; height: 200px; border: 0;"
					src="feedBackDetail.jsp"></iframe>
			</div>
		</div>
		<div class="clear"></div>
	</div>
	<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript">
		$(function() {
			var d = new Date(), str = '';
			str += d.getFullYear() + '-';
			str += d.getMonth() + 1 + '-';
			str += d.getDate() + ' ';
			str += d.getHours() + ':';
			str += d.getMinutes() + ':';
			str += d.getSeconds();
			var t = str;
			$("#btnSubmit")
					.click(
							function() {
								var num = 0;
								var str = "";
								var name = $("input[name=clientName]").val();
								var phone = $("input[name=telephone]").val();
								var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
								var content = $("textarea[name=content]").val();
								var code = $("input[name=code]").val();
								if (name == "") {
									$("#name").text("请输入姓名");
									return false;
								}
								$("#name").text("");
								if (!myreg.test(phone)) {
									$("#phone").text("请输入有效的手机号码！");
									return false;
								}
								$("#phone").text("");

								if (content == "") {
									$("#content").text("请输入意见内容");
									return false;
								}
								$("#content").text("");
								if (code == "" || code != '是') {
									$("#code").text("请输入是！");
									return false;
								}
								if (num > 0) {
									//可以提交
									//$("#frmAddAdvice").submit();
									alert("请完善信息！");
									return false;
								} else {
									var data = {
										'message_id' : null,
										'message_name' : name,
										'message_text' : content,
										'message_time' : t,
										'message_phone' : phone,
										'message_state' : 0,
										'message_answer' : 0,
										'message_reply' : null
									};
									$
											.ajax({
												url : '${pageContext.request.contextPath }/saveMessage',
												type : "POST",
												data : data,
												dataType : 'json',
												success : function(msg) {
													if (msg) {
														alert("留言成功");
													}
													location.reload();
												},
												error : function() {
													alert("留言失败");
												}
											});
								}
							})

		});
	</script>



	<footer class="inner">
	<div class="foot-nav">
		<a href="about.jsp" 0 title='关于我们'>关于我们</a><span> |</span><a
			href='${pageContext.request.contextPath }/selectOne' title='客户留言'>客户留言</a><span>|
			<span><a href='booking.jsp' title='在线预约'>在线预约</a><span>|
			</span><a href='joinUs.jsp' title='人才招聘'>人才招聘</a><span>| <a
					href='${pageContext.request.contextPath }/selectNo' title='网站地图'>联系我们</a>
	</div>
	<div class="foot-text">
		<p>恒达汽修有限公司版权所有 2017-2018 备案号：渝ICP备13004606</p>
		<p>电话：020-5856-1762</p>
	</div>
	</footer>
</body>

</html>